import {Component, Input, OnInit} from '@angular/core';
import {MatToolbar} from "@angular/material/toolbar";
import {MatIcon} from "@angular/material/icon";
import {MatButton, MatIconButton} from "@angular/material/button";
import {RouterLink} from "@angular/router";
import {OAuthService} from "angular-oauth2-oidc";
import {MatTooltip} from "@angular/material/tooltip";
import {DraftUserDto} from "../../../dto/DraftUserDto";
import {AuthGuard} from "../../../guard/auth.guard";

@Component({
  selector: 'app-header',
  standalone: true,
  imports: [
    MatToolbar,
    MatIcon,
    MatIconButton,
    RouterLink,
    MatButton,
    MatTooltip
  ],
  templateUrl: './header.component.html',
  styleUrl: './header.component.scss'
})
export class HeaderComponent implements OnInit {
  log = AuthGuard()
  isLoggedIn = false

  constructor(private oauthService: OAuthService ) {

  }


  login() {
    this.oauthService.initCodeFlow()
  }

  logout() {
    this.oauthService.logOut()
  }

  ngOnInit(): void {

  }






}
